// 返回的数据通用的TS类型
export interface ResponseData {
  code: number
  message: string
  ok: boolean
}
// 定义SKU对象的数据类型
export default interface SkuData {
  id: number
  spuId: number
  price: number
  skuName: string
  skuDesc: string
  weight: string
  tmId: number
  category3Id: number
  skuDefaultImg: string
  isSale: number // 1:上架售卖状态，0下架状态
  skuImageList: null | { id: number; imgUrl: string }[]
  skuAttrValueList: null | { id: number; valueName: string }[]
  skuSaleAttrValueList: null | { id: number; saleAttrValueName: number }[]
}
// 获取SKU列表返回的参数的类型
export interface SkuResponseData extends ResponseData {
  data: {
    records: SkuData[]
    total: number
    size: number
    current: number
    pages: number
    orders: []
    optimizeCountSql: boolean
    hitCount: boolean
    countId: null
    maxLimit: null
    searchCount: boolean
  }
}
// 获取SKU详细信息的返回数据类型
export interface SkuInfoData extends ResponseData {
  data: SkuData
}
